<?php
  if(isset ($prevPage)){
?>
  <div class="judul"><?php echo anchor($linkBack, $prevPage);?> <span class="breadcrumb"><?php echo "$titlePage";?></span></div>
<?
  }else{
?>
<div class="judul"><?php echo anchor('/raport', 'Raport');?></div>
<?php
  }
  $flashdata = $this->session->flashdata('message');
  $messages = isset ($flashdata)?pesan($flashdata):"";
  echo "$messages";
?>  
<?php
foreach ($raportList['raport'] as $row);
?>
<div class="data-input">
    <fieldset>
        <legend>Data Raport</legend>
        <table width="70%">
            <tr>
                <td valign="top" style="width: 50%">
                    <label>Tanggal</label><span style="font-size: 11px;padding-top: 7px;"><?php echo datefmysql($row['tanggal']);?></span>
                    <label>Member</label><span style="font-size: 11px;padding-top: 7px;"><?php echo $row['member'];?></span>
                    <label>Adik Asuh</label><span style="font-size: 11px;padding-top: 7px;"><?php echo $row['adik_asuh'];?></span>
                    <label>Sekolah</label><span style="font-size: 11px;padding-top: 7px;"><?php echo $row['sekolah'];?></span>
                    <label>Kelas</label><span style="font-size: 11px;padding-top: 7px;"><?php echo $row['kelas'];?></span>
                    <label>Tahun Ajaran</label><span style="font-size: 11px;padding-top: 7px;"><?php echo $row['tahun_ajaran']." ".$row['semester'];?></span>
                    <label>Kelakuan</label><span style="font-size: 11px;padding-top: 7px;"><?php echo ($row['kelakuan']=="")?"-":$row['kelakuan'];?></span>
                    <label>Kerajinan</label><span style="font-size: 11px;padding-top: 7px;"><?php echo ($row['kerajinan']=="")?"-":$row['kerajinan'];?></span>
                    <label>Kerapian</label><span style="font-size: 11px;padding-top: 7px;"><?php echo ($row['kerapian']=="")?"-":$row['kerapian'];?></span>
                    <label>Rangking</label><span style="font-size: 11px;padding-top: 7px;"><?php echo ($row['rangking']==0)?"-":$row['rangking'];?></span>
                </td>
                <td valign="top">
                    <fieldset>
                        <legend>Tidak Masuk</legend>
                        <label>Izin</label><span style="font-size: 11px;padding-top: 7px;"><?php echo ($row['tidak_masuk_izin']==0)?"-":$row['tidak_masuk_izin'];?></span>
                        <label>Sakit</label><span style="font-size: 11px;padding-top: 7px;"><?php echo ($row['tidak_masuk_sakit']==0)?"-":$row['tidak_masuk_sakit'];?></span>
                        <label>Tanpa Keterangan</label><span style="font-size: 11px;padding-top: 7px;"><?php echo ($row['tidak_masuk_alpha']==0)?"-":$row['tidak_masuk_alpha'];?></span>
                    </fieldset>
                    <label>Catatan Orang Tua</label><?php echo form_textarea("", $row['catatan_ortu'], "readonly='readonly' style='width:100%;'");?>
                    <label>Pernyataan</label><?php echo form_textarea("", $row['pernyataan'], "readonly='readonly' style='width:100%;'");?>
                </td>
            </tr>
        </table>    
    </fieldset>
</div>

<fieldset>
    <legend>Daftar Nilai Mata Pelajaran</legend>
    <div class="data-list">
        <table class="tabel">
            <tr>
                <th>No</th>
                <th style="width:25%">Mata Pelajaran</th>
                <th style="width:8%">KKM</th>
                <th style="width:8%">Nilai Angka</th>
                <th style="width:20%">Nilai Terbilang</th>
                <th>Deskripsi Kemajuan Belajar</th>
            </tr>
            <?php
            $no = 1;
            foreach ($raportList['detailMapel'] as $rows){
            ?>
            <tr class="<?php echo ($no%2)?"even":"odd";?>">
                <td align="center"><?php echo $no++;?></td>
                <td><?php echo $rows['mata_pelajaran']?></td>
                <td><?php echo $rows['kkm']?></td>
                <td><?php echo $rows['nilai_angka']?></td>
                <td><?php echo $rows['nilai_terbilang']?></td>
                <td><?php echo $rows['deskripsi_kemajuan_belajar']?></td>
            </tr>
            <?php
            }
            ?>
        </table>
    </div>
</fieldset>
<br />
<fieldset>
    <legend>Daftar Nilai Ekstrakulikuler</legend>
    <div class="data-list">
        <table class="tabel" style="width: 50%">
            <tr>
                <th style="width:10%">No</th>
                <th style="width:45%">Ekstrakulikuler</th>
                <th>Predikat</th>
            </tr>
            <?php 
              $num = 1;
              foreach ($raportList['detailEkskul'] as $rowz){
            ?>
            <tr class="<?php echo ($num%2)?"even":"odd";?>">
                <td align="center"><?php echo $num++;?></td>
                <td><?php echo $rowz['ekstrakulikuler']?></td>
                <td><?php echo $rowz['predikat']?></td>
            </tr>
            <?php
              }
            ?>
        </table>
    </div>
</fieldset>
